package daily.may0527;

import java.util.stream.Stream;

public class StreamForEachTest {
    public static void main(String[] args) {
        String[] stringsArray = new String[]{"张三", "李四", "王五", "赵六", "田七"};
        Stream<String> stringStream = Stream.of(stringsArray);
        //forEach方法遍历
        stringStream.forEach(s -> System.out.print(s + " "));//张三 李四 王五 赵六 田七
    }
}
